package edu.boun.g4.coursity.domain;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 
 * @author mertusta
 * @author sebnemarslan
 */
@Entity
@Table(name = "COURSITY_USER")
public class CoursityUser implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "ID")
	@GeneratedValue
	private Integer id;

	@Column(name = "NAME")
	private String name;

	@Column(name = "USERNAME")
	private String username;

	@Column(name = "PASSWORD")
	private String password;

	@Column(name = "EMAIL")
	private String email;

	@Column(name = "ACTIVE")
	private Boolean active;

	@OneToMany
	private Set<Course> favouriteCourses;

	@OneToMany
	private Set<CoursityUser> following;

	@OneToMany
	private Set<Comment> comments;
	
	
	public CoursityUser() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Boolean isActive() {
		return active;
	}

	public void setActive(Boolean active) {
		this.active = active;
	}

	public Set<Course> getFavouriteCourses() {
		return favouriteCourses;
	}

	public void setFavouriteCourses(Set<Course> favouriteCourses) {
		this.favouriteCourses = favouriteCourses;
	}

	public Set<CoursityUser> getFollowing() {
		return following;
	}

	public void setFollowing(Set<CoursityUser> following) {
		this.following = following;
	}

	public Set<Comment> getComments() {
		return comments;
	}

	public void setComments(Set<Comment> comments) {
		this.comments = comments;
	}

	
}
